﻿// Copyright (c) 2024 .NET Foundation and Contributors. All rights reserved.
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for full license information.

namespace Akavache;

/// <summary>
/// A factory abstraction for a component that can create <see cref="HttpClient"/> instances with custom configuration for a given logical name.
/// </summary>
public interface IAkavacheHttpClientFactory
{
    /// <summary>
    /// Creates and configures an <see cref="HttpClient"/> instance using the configuration that corresponds to the logical name specified by name.
    /// </summary>
    /// <param name="name">The logical name of the client to create.</param>
    /// <returns>A new <see cref="HttpClient"/> instance.</returns>
    HttpClient CreateClient(string name);
}
